package com.proton.carepatchtemp.login.activity;

import android.content.Intent;
import android.os.Bundle;
import android.widget.Button;
import android.widget.ImageButton;

import com.proton.carepatchtemp.R;
import com.proton.carepatchtemp.base.BaseActivity;
import com.proton.carepatchtemp.utils.eventbus.MainEvent;


public class PwdSucceedActivity extends BaseActivity {

    private Button mBtn_back_login;
    private ImageButton mIB_back_succeed;

    @Override
    public void dealEvent(MainEvent event) {
    }

    @Override
    public void setListener() {
        //  返回按钮返回登录界面
        mBtn_back_login.setOnClickListener(v -> {
            //  注意任务栈，出入站顺序决定返回页面
            finish();
        });

        mIB_back_succeed.setOnClickListener(v -> {
            Intent backIntent = new Intent(PwdSucceedActivity.this, FindPwdActivity.class);
            startActivity(backIntent);
            finish();
        });
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.find_password_succeed);

        mBtn_back_login = findViewById(R.id.btn_back_login);
        mIB_back_succeed = findViewById(R.id.btn_back_succeed);

        setListener();
    }

    //  返回登录界面
    @Override
    public void onBackPressed() {
        super.onBackPressed();
        finish();
    }

    @Override
    public void onEventMainThread(MainEvent event) {

    }
}
